package a.j;

import a.b.a;
import a.b.c;
import a.b.d;
import a.c.k;
import a.c.n;
import a.c.x;
import a.f.cb;
import a.f.dc;
import a.f.fb;
import a.f.mb;
import a.f.o;
import a.f.p;
import a.f.rc;
import a.f.t;
import a.f.vc;
import a.f.wc;

import javax.swing.*;
import java.awt.*;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
import java.util.Map;

public class ec
{
  private byte a;
  private static final byte b = 0;
  private static final byte c = 1;
  private static final byte d = 2;
  private static final byte e = 4;
  public static final byte f = 0;
  public static final byte g = 3;
  public static final byte h = 1;
  public static final byte i = 7;
  public static final byte j = 5;
  private boolean k;
  private boolean l = true;
  private boolean m = true;
  private boolean n = true;
  private boolean o;
  private boolean p = true;
  private a.j.b.j q;
  private kd r;
  private boolean s;
  private zc t;
  private boolean u = true;
  static Class v;
  static Class w;
  static Class x;
  public static int y;
  
  public ec()
  {
    this((byte)3);
  }
  
  public ec(byte paramByte)
  {
    a(paramByte);
  }
  
  public byte a()
  {
    return this.a;
  }
  
  public void a(byte paramByte)
  {
    if (!ld.E) {}
    switch (paramByte)
    {
    case 0: 
    case 1: 
    case 3: 
    case 5: 
    case 7: 
      if (!ld.D) {
        break;
      }
    case 2: 
    case 4: 
    case 6: 
    default: 
      throw new IllegalArgumentException("illegal mode");
    }
    this.a = paramByte;
  }
  
  public boolean b()
  {
    return this.k;
  }
  
  public void a(boolean paramBoolean)
  {
    this.k = paramBoolean;
  }
  
  public a.j.b.j c()
  {
    if (!ld.E) {
      if (this.q == null) {
        this.q = new a.j.b.j();
      }
    }
    return this.q;
  }
  
  public void a(a.j.b.j paramj)
  {
    this.q = paramj;
  }
  
  public kd d()
  {
    if (!ld.E) {
      if (this.r == null) {
        this.r = new kd();
      }
    }
    return this.r;
  }
  
  public void a(kd paramkd)
  {
    this.r = paramkd;
  }
  
  public zc e()
  {
    if (!ld.E) {
      if (this.t == null) {
        this.t = m();
      }
    }
    return this.t;
  }
  
  public void a(zc paramzc)
  {
    this.t = paramzc;
  }
  
  public boolean f()
  {
    return this.m;
  }
  
  public void b(boolean paramBoolean)
  {
    this.m = paramBoolean;
  }
  
  public boolean g()
  {
    return this.n;
  }
  
  public void c(boolean paramBoolean)
  {
    this.n = paramBoolean;
  }
  
  public boolean h()
  {
    return this.u;
  }
  
  public void d(boolean paramBoolean)
  {
    this.u = paramBoolean;
  }
  
  public boolean i()
  {
    return this.o;
  }
  
  public void e(boolean paramBoolean)
  {
    this.o = paramBoolean;
  }
  
  public boolean j()
  {
    return this.p;
  }
  
  public void f(boolean paramBoolean)
  {
    this.p = paramBoolean;
  }
  
  public boolean k()
  {
    return this.l;
  }
  
  public void g(boolean paramBoolean)
  {
    this.l = paramBoolean;
  }
  
  private void a(pg parampg, g paramg, rc paramrc, Map paramMap)
  {
    boolean bool = ld.E;
    if (!bool)
    {
      paramg.z();
      if (!k()) {}
    }
    else
    {
      paramg.jb();
    }
    x localx = null;
    n localn = null;
    a.j.a.g localg = null;
    a.j.b.j localj = null;
    kd localkd = null;
    if (this.u)
    {
      if ((bool) || (paramg.c(rc.c) == null))
      {
        localx = ke.c(paramg);
        paramg.a(rc.c, localx);
      }
      if ((bool) || (paramg.c(rc.d) == null))
      {
        localn = ke.d(paramg);
        paramg.a(rc.d, localn);
      }
    }
    if ((bool) || (j())) {
      localkd = c(parampg, paramg, paramrc);
    }
    if (paramg.K() != null)
    {
      if (!bool) {
        if (i())
        {
          localg = a(parampg, paramg, paramrc);
          localj = b(parampg, paramg, paramrc);
          break label189;
        }
      }
      if ((bool) || (f())) {
        localg = a(parampg, paramg, paramrc);
      }
    }
    label189:
    paramMap.put("nodeSelection", localx);
    paramMap.put("edgeSelection", localn);
    if (!bool) {}
    paramMap.put(v == null ? (ec.v = a("a.j.a.g")) : v, localg);
    if (!bool) {}
    paramMap.put(w == null ? (ec.w = a("a.j.b.j")) : w, localj);
    if (!bool) {}
    paramMap.put(x == null ? (ec.x = a("a.j.kd")) : x, localkd);
  }
  
  protected a.j.a.g a(pg parampg, g paramg, rc paramrc)
  {
    a.j.a.g localg = new a.j.a.g(paramg);
    localg.k();
    return localg;
  }
  
  protected a.j.b.j b(pg parampg, g paramg, rc paramrc)
  {
    boolean bool = ld.E;
    a.j.b.j localj = c();
    if (!bool)
    {
      if ((paramrc instanceof mb))
      {
        mb localmb = (mb)paramrc;
        if (bool) {
          break label75;
        }
        if (((localmb.h() instanceof cb)) && (localmb.j())) {
          localj.b(((cb)localmb.h()).d());
        }
      }
      localj.a(paramg);
    }
    label75:
    return localj;
  }
  
  protected kd c(pg parampg, g paramg, rc paramrc)
  {
    kd localkd = d();
    localkd.a(paramg);
    return localkd;
  }
  
  private void a(g paramg, Map paramMap)
  {
    boolean bool = ld.E;
    x localx = (x)paramMap.get("nodeSelection");
    n localn = (n)paramMap.get("edgeSelection");
    if (!bool) {}
    a.j.a.g localg = (a.j.a.g)paramMap.get(v == null ? (ec.v = a("a.j.a.g")) : v);
    c(paramg, paramMap);
    d(paramg, paramMap);
    Object localObject1 = paramMap.get("nrics");
    if (!bool) {
      if ((localObject1 instanceof k)) {
        paramg.j(a.f.ec.a);
      }
    }
    Object localObject2 = paramMap.get("nrict");
    if ((localObject2 instanceof k)) {
      paramg.j(a.f.ec.b);
    }
    if (localg != null) {
      a(paramg, localg);
    }
    if (localx != null) {
      paramg.j(rc.c);
    }
    if (localn != null) {
      paramg.j(rc.d);
    }
    paramg.A();
  }
  
  private void c(g paramg, Map paramMap)
  {
    boolean bool = ld.E;
    if (!bool) {}
    a.j.b.j localj = (a.j.b.j)paramMap.get(w == null ? (ec.w = a("a.j.b.j")) : w);
    if (!bool)
    {
      if (localj != null) {
        a(paramg, localj);
      }
    }
    else
    {
      if (!bool) {}
      paramMap.remove(w == null ? (ec.w = a("a.j.b.j")) : w);
    }
  }
  
  private void d(g paramg, Map paramMap)
  {
    boolean bool = ld.E;
    if (!bool) {}
    Class localClass = x == null ? (ec.x = a("a.j.kd")) : x;
    kd localkd = (kd)paramMap.get(localClass);
    if (!bool)
    {
      if (localkd != null) {
        a(paramg, localkd);
      }
    }
    else {
      paramMap.remove(localClass);
    }
  }
  
  protected void a(g paramg, a.j.a.g paramg1)
  {
    paramg1.l();
  }
  
  protected void a(g paramg, a.j.b.j paramj)
  {
    paramj.e(paramg);
  }
  
  protected void a(g paramg, kd paramkd)
  {
    paramkd.f(paramg);
  }
  
  private rc a(pg parampg, rc paramrc)
  {
    boolean bool = ld.E;
    if (!bool) {
      if ((g()) && (parampg != null) && ((bool) || ((paramrc instanceof mb))))
      {
        localObject1 = (mb)paramrc;
        if ((bool) || ((((mb)localObject1).e() instanceof t)))
        {
          localObject2 = (t)((mb)localObject1).e();
          a(parampg, (t)localObject2);
        }
      }
    }
    Object localObject1 = d();
    Object localObject2 = ((kd)localObject1).d();
    if (!bool) {
      if (localObject2 != null)
      {
        ((vc)localObject2).a(paramrc);
        paramrc = (rc)localObject2;
      }
    }
    return paramrc;
  }
  
  final void a(o paramo, fb paramfb)
  {
    if (n()) {
      paramfb.doLayout(paramo);
    }
  }
  
  private fb f(g paramg, Map paramMap)
  {
    fb localfb = new fb();
    j localj;
    if (!ld.E) {
      if (paramg.c(a.f.ec.a) == null)
      {
        localj = new j(paramg, true);
        paramMap.put("nrics", localj);
        paramg.a(a.f.ec.a, localj);
      }
    }
    if (paramg.c(a.f.ec.b) == null)
    {
      localj = new j(paramg, false);
      paramMap.put("nrict", localj);
      paramg.a(a.f.ec.b, localj);
    }
    return localfb;
  }
  
  private g_ a(pg parampg, g paramg, rc paramrc, Runnable paramRunnable, j_ paramj_, boolean paramBoolean)
  {
    new g_(parampg, paramg, paramrc, paramBoolean, paramj_)
    {
      private volatile d c;
      private volatile c p;
      private final ec.j_ val$listener;
      private final Runnable val$doneListener;
      
      protected void a(p paramAnonymousp)
      {
        boolean bool = ld.E;
        if (!bool) {}
        a.j.b.j localj = (a.j.b.j)this.j.get(ec.w == null ? (ec.w = ec.a("a.j.b.j")) : ec.w);
        if (!bool)
        {
          if (localj != null) {
            localj.g(this.g);
          }
          this.c = ec.this.l();
          this.c.b(true);
          this.p = ec.this.a(this.f, this.g, paramAnonymousp.O());
        }
        if (!bool) {
          if (this.p != null)
          {
            if (!bool)
            {
              if (ec.this.e().d()) {
                this.p = a.a(this.p);
              }
              this.c.a(this.f);
              if (bool) {
                break label176;
              }
              this.c.a(new ec.3(this));
            }
            if (!ld.D) {
              return;
            }
          }
        }
        label176:
        ec.this.a(this.g, paramAnonymousp.O());
      }
      
      void b()
      {
        super.b();
        a(new ec.4(this));
      }
      
      protected void c(p paramAnonymousp)
      {
        boolean bool = ld.E;
        if (((bool) || (this.c != null)) && ((bool) || (this.p != null))) {
          this.c.a(this.p);
        }
      }
      
      protected void h()
      {
        boolean bool = ld.E;
        super.h();
        if (!bool) {
          if (this.d != null)
          {
            if (bool) {
              break label47;
            }
            if (this.val$listener != null) {
              this.val$listener.a(this.d);
            }
          }
        }
        label47:
        if ((bool) || (this.val$doneListener != null)) {
          this.val$doneListener.run();
        }
      }
    };
  }
  
  private g_ b(pg parampg, g paramg, rc paramrc, Runnable paramRunnable, j_ paramj_, boolean paramBoolean)
  {
    new g_(parampg, paramg, paramrc, paramBoolean, paramj_)
    {
      private final ec.j_ val$listener;
      private final Runnable val$doneListener;
      
      protected void a(p paramAnonymousp)
      {
        ec.this.a(this.g, paramAnonymousp.O());
      }
      
      protected void h()
      {
        boolean bool = ld.E;
        super.h();
        this.g.gb();
        if (!bool) {
          if (this.d != null)
          {
            if (bool) {
              break label54;
            }
            if (this.val$listener != null) {
              this.val$listener.a(this.d);
            }
          }
        }
        label54:
        if ((bool) || (this.val$doneListener != null)) {
          this.val$doneListener.run();
        }
      }
    };
  }
  
  public void a(g paramg, rc paramrc)
  {
    a(null, paramg, paramrc, null, null);
  }
  
  public void b(pg parampg, rc paramrc)
  {
    a(parampg, parampg.a(), paramrc, null, null);
  }
  
  public void d(pg parampg, g paramg, rc paramrc)
  {
    a(parampg, paramg, paramrc, null, null);
  }
  
  public void a(g paramg, rc paramrc, Runnable paramRunnable, j_ paramj_)
  {
    a(null, paramg, paramrc, paramRunnable, paramj_);
  }
  
  public k_ a(pg parampg, rc paramrc, Runnable paramRunnable, j_ paramj_)
  {
    return a(parampg, parampg.a(), paramrc, paramRunnable, paramj_);
  }
  
  public k_ a(pg parampg, g paramg, rc paramrc, Runnable paramRunnable, j_ paramj_)
  {
    boolean bool3 = ld.E;
    boolean bool2 = ld.D;
    if (paramg == null) {
      throw new IllegalArgumentException("graph may not be null.");
    }
    if (paramrc == null) {
      throw new IllegalArgumentException("layouter may not be null.");
    }
    if (!bool3) {}
    int i1 = (a() & 0x4) == 4 ? 1 : 0;
    if (!bool3) {
      if (i1 == 0) {
        if (bool3) {
          break label84;
        }
      }
    }
    label84:
    boolean bool1 = b(parampg);
    if ((parampg != null) && ((bool3) || ((a() & 0x2) == 2))) {
      if (bool3) {}
    }
    int i2 = e().c() > 0L ? 1 : 0;
    if (!bool3) {}
    int i3 = (a() & 0x1) == 1 ? 1 : 0;
    Object localObject2;
    if (!bool3) {
      if (i3 == 0)
      {
        localObject1 = new HashMap();
        a(parampg, paramg, paramrc, (Map)localObject1);
        localObject2 = a(parampg, paramrc);
        try
        {
          ((rc)localObject2).doLayout(paramg);
          if (!bool3)
          {
            if (n()) {
              a(paramg, f(paramg, (Map)localObject1));
            }
            paramg.gb();
          }
        }
        catch (RuntimeException localRuntimeException)
        {
          if ((bool3) || (paramj_ != null))
          {
            paramj_.a(localRuntimeException);
            if (!bool2) {}
          }
          else
          {
            throw localRuntimeException;
          }
        }
        finally
        {
          a(paramg, (Map)localObject1);
          if ((bool3) || (paramRunnable != null)) {
            paramRunnable.run();
          }
        }
        return null;
      }
    }
    Object localObject1 = new Throwable[1];
    if (!bool3) {
      if ((i1 == 0) && (paramj_ == null)) {
        paramj_ = new j_()
        {
          private final Throwable[] val$ta;
          
          public void a(Throwable paramAnonymousThrowable)
          {
            this.val$ta[0] = paramAnonymousThrowable;
          }
        };
      }
    }
    if (i2 != 0)
    {
      localObject2 = a(parampg, paramg, paramrc, paramRunnable, paramj_, bool1);
      if (bool3) {
        break label386;
      }
      if (!bool2) {}
    }
    else
    {
      localObject2 = b(parampg, paramg, paramrc, paramRunnable, paramj_, bool1);
    }
    label386:
    if (!bool3)
    {
      if (i1 != 0)
      {
        a((Runnable)localObject2);
        if (bool3) {
          break label420;
        }
      }
    }
    else {
      if (!bool2) {
        break label473;
      }
    }
    if (!bool3)
    {
      ((g_)localObject2).run();
      label420:
      if (localObject1[0] != null)
      {
        if (!bool3) {
          if ((localObject1[0] instanceof RuntimeException)) {
            throw ((RuntimeException)localObject1[0]);
          }
        }
        if ((bool3) || ((localObject1[0] instanceof Error))) {
          throw ((Error)localObject1[0]);
        }
      }
    }
    label473:
    return ((g_)localObject2).a();
  }
  
  protected void a(Runnable paramRunnable)
  {
    Thread localThread = new Thread(paramRunnable);
    localThread.setDaemon(true);
    localThread.start();
  }
  
  private Map a(pg parampg)
  {
    if ((parampg != null) && (b()))
    {
      HashMap localHashMap = new HashMap();
      a(parampg, localHashMap);
      return localHashMap;
    }
    return null;
  }
  
  protected void a(pg parampg, Map paramMap)
  {
    boolean bool = parampg.t();
    paramMap.put("wasInputSuppressed", bool ? Boolean.TRUE : Boolean.FALSE);
    parampg.b(true);
    paramMap.put("oldCursor", parampg.O());
    parampg.a(Cursor.getPredefinedCursor(3));
  }
  
  protected void b(pg parampg, Map paramMap)
  {
    if (!ld.E) {
      if (paramMap.get("wasInputSuppressed") == Boolean.FALSE) {
        parampg.b(false);
      }
    }
    Object localObject = paramMap.get("oldCursor");
    if ((localObject instanceof Cursor)) {
      parampg.a((Cursor)localObject);
    }
  }
  
  protected void a(pg parampg, t paramt)
  {
    boolean bool = ld.E;
    Dimension localDimension = parampg.getSize();
    paramt.a(localDimension.getWidth(), localDimension.getHeight());
    double d1 = (bool) || (parampg.u()) ? parampg.w() : 0.0D;
    if (!bool)
    {
      paramt.a(0.0D);
      if (d1 > 0.0D)
      {
        if (bool) {
          break label82;
        }
        paramt.b(d1);
        if (!ld.D) {
          return;
        }
      }
    }
    label82:
    paramt.b(45.0D);
  }
  
  protected d l()
  {
    return new d();
  }
  
  protected zc m()
  {
    zc localzc = new zc();
    localzc.a(300L);
    localzc.a(true);
    return localzc;
  }
  
  protected c a(pg parampg, g paramg, dc paramdc)
  {
    zc localzc = e();
    localzc.b(parampg, paramdc);
    return localzc;
  }
  
  protected boolean b(pg parampg)
  {
    boolean bool = ld.E;
    if ((!SwingUtilities.isEventDispatchThread()) && ((bool) || (parampg != null))) {
      if (bool) {}
    }
    return parampg.isShowing();
  }
  
  protected void a(g paramg, dc paramdc)
  {
    wc.a(paramg, new zc.b_.a_(paramg, paramdc));
  }
  
  public boolean n()
  {
    return this.s;
  }
  
  public void h(boolean paramBoolean)
  {
    this.s = paramBoolean;
  }
  
  static Class a(String paramString)
  {
    try
    {
      return Class.forName(paramString);
    }
    catch (ClassNotFoundException localClassNotFoundException)
    {
      throw new NoClassDefFoundError(localClassNotFoundException.getMessage());
    }
  }
  
  abstract class g_
    implements Runnable
  {
    private fb a;
    volatile p b;
    volatile Throwable d;
    volatile rc e;
    final pg f;
    final g g;
    final rc h;
    final boolean i;
    final Map j = new HashMap();
    private volatile Map k;
    private volatile boolean l;
    private volatile boolean m;
    private volatile Thread n;
    
    g_(pg parampg, g paramg, rc paramrc, boolean paramBoolean)
    {
      this.g = paramg;
      this.h = paramrc;
      this.f = parampg;
      this.i = paramBoolean;
    }
    
    ec.k_ a()
    {
      return new a_();
    }
    
    void b()
    {
      boolean bool = ld.E;
      this.l = true;
      if (((bool) || (!this.m)) && ((bool) || (this.n != null)) && ((bool) || ((this.n.isAlive()) && ((bool) || (!this.n.isInterrupted()))))) {
        this.n.interrupt();
      }
    }
    
    public g c()
    {
      return this.g;
    }
    
    public rc d()
    {
      return this.h;
    }
    
    public pg e()
    {
      return this.f;
    }
    
    protected void f()
    {
      boolean bool = ld.E;
      this.k = ec.this.a(this.f);
      ec.this.a(this.f, this.g, this.h, this.j);
      this.e = ec.this.a(this.f, this.h);
      if (!bool) {
        if (ec.this.n())
        {
          this.a = ec.this.f(this.g, this.j);
          if (bool) {
            return;
          }
          if (!ld.D) {
            break label109;
          }
        }
      }
      this.a = null;
      label109:
      this.b = new p(this.g);
    }
    
    protected void g() {}
    
    protected abstract void a(p paramp);
    
    protected void c(p paramp) {}
    
    protected void h()
    {
      try
      {
        ec.this.a(this.g, this.j);
      }
      finally
      {
        if ((ld.E) || (this.k != null)) {
          ec.this.b(this.f, this.k);
        }
      }
    }
    
    public void run()
    {
      boolean bool = ld.E;
      try
      {
        this.n = Thread.currentThread();
        if (!bool) {
          if (!this.l)
          {
            a(new ec.0(this));
            if (!bool) {
              if (this.d != null) {
                g();
              }
            }
            try
            {
              if (!bool) {
                if (!this.l)
                {
                  if (bool) {
                    break label132;
                  }
                  if (this.d == null)
                  {
                    if (bool) {
                      break label132;
                    }
                    if (this.b != null)
                    {
                      if (bool) {
                        break label132;
                      }
                      if (this.e != null) {
                        try
                        {
                          this.e.doLayout(this.b);
                        }
                        catch (RuntimeException localRuntimeException)
                        {
                          this.d = localRuntimeException;
                        }
                        catch (Error localError)
                        {
                          this.d = localError;
                        }
                      }
                    }
                  }
                }
              }
              label132:
              if (!bool)
              {
                if (!this.l)
                {
                  if (bool) {
                    break label180;
                  }
                  if (this.d == null)
                  {
                    if (bool) {
                      break label180;
                    }
                    if (this.b != null) {
                      a(new ec.1(this));
                    }
                  }
                }
                label180:
                if (bool) {}
              }
              else if (!this.l)
              {
                if (bool) {
                  break label224;
                }
                if (this.d == null)
                {
                  if (bool) {
                    break label224;
                  }
                  if (this.b != null) {
                    c(this.b);
                  }
                }
              }
            }
            finally
            {
              label224:
              a(new ec.2(this));
            }
          }
        }
      }
      finally
      {
        this.m = true;
      }
    }
    
    void a(Runnable paramRunnable)
    {
      boolean bool = ld.E;
      if (!bool) {
        if ((this.i) && (!SwingUtilities.isEventDispatchThread()))
        {
          try
          {
            SwingUtilities.invokeAndWait(paramRunnable);
          }
          catch (InterruptedException localInterruptedException)
          {
            this.d = localInterruptedException;
          }
          catch (InvocationTargetException localInvocationTargetException)
          {
            if (bool) {
              break label57;
            }
          }
          this.d = localInvocationTargetException.getTargetException();
          if (!ld.D) {
            return;
          }
        }
      }
      label57:
      paramRunnable.run();
    }
    
    class a_
      implements ec.k_
    {
      a_() {}
      
      public void b()
      {
        ec.g_.this.b();
      }
      
      public Throwable d()
      {
        return ec.g_.this.d;
      }
      
      public Thread a()
      {
        return ec.g_.this.n;
      }
      
      public boolean c()
      {
        if (!ld.E) {}
        return !ec.g_.this.m;
      }
    }
  }
  
  public static abstract interface k_
  {
    public abstract Thread a();
    
    public abstract void b();
    
    public abstract boolean c();
    
    public abstract Throwable d();
  }
  
  public static abstract interface j_
  {
    public abstract void a(Throwable paramThrowable);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.ec

 * JD-Core Version:    0.7.0.1

 */